// React 核心包
import React from 'react'
// 渲染 React 代码到页面上
import { createRoot } from 'react-dom/client'
const list = [
  { id: 1, name: '武汉黑马前端64期', salary: 11000 },
  { id: 2, name: '武汉黑马前端66期', salary: 13000 },
  { id: 3, name: '武汉黑马前端68期', salary: 15000 },
]
const wrap = (
  <ul>
    {list.map((item) => (
      <li key={item.id}>
        班级: {item.name} 薪资: {item.salary}
      </li>
    ))}
  </ul>
)

// createRoot(渲染到哪儿).render(渲染谁)
createRoot(document.querySelector('#root')).render(wrap)
